package com.xianzw.mnfun.web.controller.front;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import com.xianzw.mnfun.model.domain.ConstellationFortune;
import com.xianzw.mnfun.service.ConstellationFortuneService;
import com.xianzw.mnfun.web.controller.core.BaseController;

/**
 * 星座运势
 * @author xianzw
 *
 * 2018年9月12日下午1:23:54
 */
@Controller
@RequestMapping("/constellationFortune")
public class FrontConstellationFortuneController extends BaseController{
    
    @Autowired
    private ConstellationFortuneService constellationFortuneService;
    
    /**
     * 今日星座运势
     * @return
     */
    @GetMapping(value = "/constellationFortune")
    public String constellationFortune(Model model) {
	List<ConstellationFortune> fortuneList = constellationFortuneService.findByDate();
	model.addAttribute("fortuneList", fortuneList);
        return this.render("constellationFortune/constellationFortunes");
    }

}
